package com.lemo;

import javax.jms.Queue;
import javax.jms.Topic;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * 
    * @className: ActiveMQApplication
    * @description: 
    * @author liming
    * @date 2017年2月20日 上午10:34:12
    *
 */
@SpringBootApplication
public class ActiveMQApplication {
	
	public static void main(String[] args) {
		SpringApplication.run(ActiveMQApplication.class, args);
	}
	
	@Bean
	public Queue queue(){
		return new ActiveMQQueue("sample.queue");
	}
	
	@Bean
    public Topic topic() {
       return new ActiveMQTopic("sample.topic");
    }
}
